package com.PSM.holausuariomodificado_grupo6;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.content.Intent;

/******************************************/
/**					HUM					 **/
/******************************************/
public class MainActivity extends Activity
{
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		
		final EditText txtNombre = (EditText)findViewById(R.id.field_Nombre);
		final EditText txtEdad = (EditText)findViewById(R.id.field_Edad);
		final Button BtnAceptar = (Button)findViewById(R.id.btn_Aceptar);
		
		BtnAceptar.setOnClickListener(new OnClickListener()
		{
			@Override
			public void onClick(View v)
			{
				Intent intent = new Intent(MainActivity.this, FrmHola.class);
			
				Bundle bundle = new Bundle();
				
				bundle.putString("NOMBRE", txtNombre.getText().toString());
				bundle.putString("EDAD", txtEdad.getText().toString());
				
				intent.putExtras(bundle);
				
				startActivity(intent);
			}
		});
	}
}
